Skip to content

feat(stylelint-config)!: require stylelint 18 and remove SCSS config - #207

Merged
dangreen merged 2 commits into
mainfrom
feat/stylelint-18
Nov 15, 2026
Merged

dangreen merged 2 commits into
mainfrom
feat/stylelint-18

Conversation

@dangreen

Copy link
Copy Markdown
Member

Why

Stylelint 18.0.0 is the latest release. It needs @stylistic/stylelint-plugin 6, which refuses conflicting settings and reads SCSS files only under the @stylistic/scss/ rule names. The SCSS config goes away instead of being ported to those names.

What

  • stylelint 18.0.0, and the peer range is now >=18.0.0.
  • @stylistic/stylelint-plugin 6.0.1. The other plugins move to their latest releases, whose peer ranges include stylelint 18: stylelint-declaration-strict-value 1.13.0, stylelint-gamut 2.0.2, stylelint-high-performance-animation 2.1.0, stylelint-order 8.1.3, stylelint-plugin-a11y 1.1.0.
  • declaration-block-single-line-max-declarations is gone from stylelint, so the config uses @stylistic/declaration-block-single-line-max-declarations with the same option.
  • @stylistic/block-closing-brace-space-after and @stylistic/block-opening-brace-newline-before are removed. Stylistic 6 refuses them next to block-closing-brace-newline-after: always and block-opening-brace-space-before: always, which already define that whitespace.
  • at-charset-rule-no-invalid is on. Stylistic 6 no longer checks @charset and warns where this rule is off. The rule asks for double quotes, the only spelling browsers accept, while @stylistic/string-quotes: single used to ask for single quotes there.
  • @trigen/stylelint-config/scss is removed together with postcss-scss, stylelint-scss, its README entry and the scss keyword.

Notes

  • Checked on Node.js 26.10.0 against the config on main with valid and invalid CSS fixtures, through the Node.js API and the CLI. The valid fixtures stay clean. The invalid ones get the same warnings at the same positions, apart from the renamed rule, the two removed rules and one position of stylelint-plugin-a11y explained below. --fix in three passes writes the same output, apart from the two a11y fixes below.
  • From a consumer project, the main config, /logical and /strict load through extends, and /scss fails to resolve.
  • stylelint-plugin-a11y 1.1.0 still reads context.fix, which stylelint 18 removed, so a11y/selector-pseudo-class-focus and a11y/media-prefers-reduced-motion report instead of fixing. Its rules also pass node.lastEach as index, so their positions depend on how many walks other rules made. Both need a fix in that repository.
  • stylelint-plugin-logical-css 2.1.0 is its latest release and lists stylelint up to 17 as peer. It works with 18 and does not read context.fix, pnpm reports the peer mismatch.
  • stylelint-declaration-strict-value 1.13.0 is the first release that allows stylelint 18. It brings regexp.escape with about 60 es-shims packages, which is most of the lockfile growth.
  • engines stays >=22. Stylelint 18 itself asks for Node.js 22.22.2, 24.15.0 or 26.

@dangreen
dangreen merged commit a857615 into main Nov 15, 2026
6 checks passed
@dangreen
dangreen deleted the feat/stylelint-18 branch November 15, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant